package com.group3.domain;

import com.group3.controller.Validated.Add;
import com.group3.controller.Validated.IdCard;
import com.group3.pojo.receive.TeacherReceive;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;

@Data
@ToString
@ApiModel(value = "教师信息")
public class Teacher {

    @NotEmpty(message = "教师工号不能为空", groups = {Add.class})
    @ApiModelProperty(value = "教师工号")
    private String teacherId;

    @NotEmpty(message = "教师姓名不能为空", groups = {Add.class})
    @ApiModelProperty(value = "教师姓名")
    private String teacherName;

    @Max(value = 1, message = "1表示为女", groups = {Add.class})
    @Min(value = 0, message = "0表示为男", groups = {Add.class})
    @ApiModelProperty(value = "教师性别")
    private Integer sex;

    @NotEmpty(message = "教师身份证号不能为空", groups = {Add.class})
    @IdCard(groups = {Add.class})
    @ApiModelProperty(value = "教师身份证号")
    private String cardId;

    @ApiModelProperty(value = "教师登陆密码")
    private String password;

    @NotEmpty(message = "教师职位不能为空", groups = {Add.class})
    @ApiModelProperty(value = "教师职位")
    private String position;

    @ApiModelProperty(value = "教师状态")
    private Integer status;

    @ApiModelProperty(value = "教师电话号码")
    private String tel;

    public String getTeacherId() {
        return teacherId;
    }

    public void setTeacherId(String teacherId) {
        this.teacherId = teacherId == null ? null : teacherId.trim();
    }

    public String getTeacherName() {
        return teacherName;
    }

    public void setTeacherName(String teacherName) {
        this.teacherName = teacherName == null ? null : teacherName.trim();
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public String getCardId() {
        return cardId;
    }

    public void setCardId(String cardId) {
        this.cardId = cardId == null ? null : cardId.trim();
    }

//    public String getPassword() {
//        return password;
//    }

    public void setPassword(String password) {
        this.password = password ;
    }

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position == null ? null : position.trim();
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel == null ? null : tel.trim();
    }
}